package ch.fusun.baron.player;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.player.api.MarriageService;

/**
 * Adds a marriage proposal
 */
public class MarriageProposedDataUpdate implements DataUpdate {

	@Inject
	private transient MarriageService marriageService;
	private Player proposer;
	private Player proposedTo;

	/**
	 * Kryo
	 */
	public MarriageProposedDataUpdate() {
	}

	/**
	 * @param proposer
	 * @param proposedTo
	 */
	public MarriageProposedDataUpdate(Player proposer, Player proposedTo) {
		this.proposer = proposer;
		this.proposedTo = proposedTo;
	}

	@Override
	public void update() {
		marriageService.proposeMarriage(proposer, proposedTo);
	}

}
